home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / Pascal / Code Resources / Ingis WDEF 1.3 / CustomStubs.p (empty) next >
Text File  |  1997-05-09  |  6KB  |  138 lines

  1. {Empty stubs. Fill in the parts you need for your window.}
  2. {This unit holds all custom code}
  3.  
  4. unit CustomStubs;
  5.  
  6. interface
  7.     uses
  8. {$IFC UNDEFINED THINK_PASCAL}
  9.         Types, QuickDraw, ToolUtils, Windows, 
  10. {$ENDC}
  11.         IngisWDEFUtils;
  12.  
  13. {Lots of routines, right? Don't worry; you can skip several of them if you don't plan on supporting zoom box,}
  14. {close box or grow regions, and you can call some default routines in IngisWDEFUtils.}
  15.  
  16.     procedure GetGrowRgn (varCode: integer; macWindow: WindowPeek; var growRgn: RgnHandle);
  17.     procedure GetCloseBox (varCode: integer; dragBar: RgnHandle; var closeBox: Rect);
  18.     procedure GetZoomBox (varCode: integer; dragBar: RgnHandle; var zoomBox: Rect);
  19.     procedure DrawCloseBox (varCode: integer; macWindow: WindowPeek; closeBox: Rect; colorFlag: Boolean);
  20.     procedure DrawZoomBox (varCode: integer; macWindow: WindowPeek; zoomBox: Rect; colorFlag: Boolean);
  21.     procedure DrawHitCloseBox (varCode: integer; macWindow: WindowPeek; closeBox: Rect; colorFlag: Boolean);
  22.     procedure DrawHitZoomBox (varCode: integer; macWindow: WindowPeek; zoomBox: Rect; colorFlag: Boolean);
  23.     procedure DrawDragBar (varCode: integer; macWindow: WindowPeek; dragBar: RgnHandle; colorFlag: Boolean);
  24.     procedure BuildCustomRegions (varCode: integer; theRect: Rect; contRgn, dragRgn: RgnHandle);
  25.     procedure DrawScrollFrame (varCode: integer; macWindow: WindowPeek; theRect: Rect);
  26.     procedure DrawTheGrowIcon (varCode: integer; macWindow: WindowPeek; theRect: Rect; growRgn: RgnHandle; colorFlag: Boolean);
  27.     procedure InitMyWindow (varCode: integer; macWindow: WindowPeek);
  28.     procedure DisposeMyWindow (varCode: integer; macWindow: WindowPeek);
  29.  
  30. {** Constants **}
  31.     const
  32.         kFrameWidth = 1;        { Thickness of frame around window. 1 is normal.}
  33.         kShadowLength = 1;        { Size of drop shadow. 1 is normal.}
  34.         kMinDepthForColor = 4;    { Smallest pixel size for color. 8 (256 colors) is normal. }
  35.         kMinWidth = 100;        { Limits for the dragging rectangle? }
  36.         kMinHeight = 100;
  37.  
  38.     type
  39.         MyDataRecord = record
  40.                 theWindowState: WStateData;
  41. {Insert any globals you need here!}
  42.             end;
  43.         MyDataPtr = ^MyDataRecord;
  44.         MyDataHandle = ^MyDataPtr;
  45.  
  46. implementation
  47.  
  48. {*****************************************************************************}
  49. { GetGrowRgn}
  50. {        Return the region with the grow icon, if any.}
  51. { *****************************************************************************}
  52.  
  53.     procedure GetGrowRgn (varCode: integer; macWindow: WindowPeek; var growRgn: RgnHandle);
  54.     begin
  55.     end;
  56.  
  57. {*****************************************************************************}
  58. { GetCloseBox}
  59. {        Pass back a rectangle which encloses the close box of the window}
  60. { *****************************************************************************}
  61.  
  62.     procedure GetCloseBox (varCode: integer; dragBar: RgnHandle; var closeBox: Rect);
  63.     begin
  64.     end;
  65.  
  66.     procedure GetZoomBox (varCode: integer; dragBar: RgnHandle; var zoomBox: Rect);
  67.     begin
  68.     end;
  69.  
  70. {*****************************************************************************}
  71. { Draw close box and zoom box, in normal and hit state }
  72. {        Draw the close box in "hit" state. This can be as simple as an InvertRect. }
  73. { *****************************************************************************}
  74.  
  75.     procedure DrawCloseBox (varCode: integer; macWindow: WindowPeek; closeBox: Rect; colorFlag: Boolean);
  76.     begin
  77.     end; {}
  78.     procedure DrawZoomBox (varCode: integer; macWindow: WindowPeek; zoomBox: Rect; colorFlag: Boolean);
  79.     begin
  80.     end; {}
  81.     procedure DrawHitCloseBox (varCode: integer; macWindow: WindowPeek; closeBox: Rect; colorFlag: Boolean);
  82.     begin
  83.     end; {}
  84.     procedure DrawHitZoomBox (varCode: integer; macWindow: WindowPeek; zoomBox: Rect; colorFlag: Boolean);
  85.     begin
  86.     end; {}
  87.  
  88. {*****************************************************************************}
  89. { DrawDragBar, BW and Color version}
  90. {        Draw the drag bar (not close box/zoom box)}
  91. { *****************************************************************************}
  92.  
  93.     procedure DrawDragBar (varCode: integer; macWindow: WindowPeek; dragBar: RgnHandle; colorFlag: Boolean);
  94.     begin
  95.     end; {DrawDragBar}
  96.  
  97. {*****************************************************************************}
  98. { BuildCustomRegions}
  99. {        Build the contents region and the drag bar region}
  100. { *****************************************************************************}
  101.  
  102.     procedure BuildCustomRegions (varCode: integer; theRect: Rect; contRgn, dragRgn: RgnHandle);
  103.     begin
  104.     end; {BuildCustomRegions}
  105.  
  106. {*****************************************************************************}
  107. { DrawScrollFrame}
  108. {        Draw the scroll frame, if any (used both when resizing and when drawing the grow icon) }
  109. { *****************************************************************************}
  110.  
  111.     procedure DrawScrollFrame (varCode: integer; macWindow: WindowPeek; theRect: Rect);
  112.     begin
  113.     end; {DrawScrollFrame}
  114.  
  115. {*****************************************************************************}
  116. { DrawTheGrowIcon, BW and Color version}
  117. {        Draw the grow icon, if any }
  118. { *****************************************************************************}
  119.  
  120.     procedure DrawTheGrowIcon (varCode: integer; macWindow: WindowPeek; theRect: Rect; growRgn: RgnHandle; colorFlag: Boolean);
  121.     begin
  122.     end; {DrawTheGrowIcon}
  123.  
  124. {*****************************************************************************}
  125. { InitMyWindow and DisposeMyWindow }
  126. {        Can often be empty. Set the spareFlag in InitMyWindow if the variant should have a zoom box. }
  127. {        InitMyWindow may initialize any globals in MyDataHandle(macWindow^.dataHandle). }
  128. {        DisposeMyWindow must restore/dispose fields in MyDataHandle(macWindow^.dataHandle) as needed. }
  129. { *****************************************************************************}
  130.  
  131.     procedure InitMyWindow (varCode: integer; macWindow: WindowPeek);
  132.     begin
  133.     end; {}
  134.     procedure DisposeMyWindow (varCode: integer; macWindow: WindowPeek);
  135.     begin
  136.     end; {}
  137.  
  138. end.